#define _CRT_SECURE_NO_WARNINGS 1
#include"Sort.h"

void ArrayPrint(int* a, int n)
{
	for (int i = 0; i < n; i++)
	{
		printf("%d ", a[i]);
	}
	printf("\n");
}


void InsertSort(int* a, int n)
{
	for (int i = 1; i < n; i++)
	{
		int end = i - 1;
		int tmp = a[i];
		while (end >= 0 && tmp < a[end])
		{
			a[end + 1] = a[end];
			end--;
		}
		a[end+1] = tmp;
	}
}